import Vue from 'vue'

import 'windi.css'

import App from './App.vue'
import { initRouter } from './router'
// 主题色
import './theme/index.less'
// 全局通用样式
import './assets/css/index.less'

import Viser from 'viser-vue'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import { initI18n } from '@/utils/i18n'
import bootstrap from '@/bootstrap'
import 'moment/locale/zh-cn'

// storage缓存扩展支持过期时间-begin
import storage from 'store'
import expirePlugin from 'store/plugins/expire'
storage.addPlugin(expirePlugin)
// storage缓存扩展支持过期时间-end

// 引入通用组件
import ZComponents from '@/components/zz/index'

const i18n = initI18n('CN', 'US')
const router = initRouter({ i18n })

Vue.config.productionTip = false
Vue.use(Viser)
Vue.use(Plugins)
Vue.use(ZComponents)

bootstrap({ router, store, i18n, message: Vue.prototype.$message })

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
